<template>
  <div class="content-box intro-y">
    <hBase :args="args">
      <template #parts>
        <el-table-column prop="userAcc" label="账户" width="180"/>
        <el-table-column prop="companyName" label="企业名称" width="240"/>
        <el-table-column prop="companyLinker" label="联系人" width="100"/>
        <el-table-column prop="companyLinkerTel" label="联系电话" width="120"/>
        <el-table-column prop="companyAddr" label="地址" width="180"/>
        <el-table-column prop="companyEmail" label="邮箱" width="180"/>
       
        <el-table-column/>
      </template>
      <template #edit="{ init, close }">
        <edit :init="init" @close="close"></edit>
      </template>
    </hBase>
  </div>
</template>

<script setup>
import {onMounted, computed, ref} from "vue";
import hBase from "../base/hBase.vue";
import * as $api from "@/api/api.js";
import edit from "./Edit.vue"
import {
  CompanyAdminDelete,
  CompanyAdminQuery,
  EquipmentDelete,
  EquipmentQueryAll,
  MobileRegDelete,
  MobileRegQueryAll
} from "@/api/api.js";

const userKey = ref(localStorage.getItem("userKey"));
onMounted(() => {
  console.log($api.BATeacherQueryCondition); // 使用 globalProperties 上的 $api
});
const args = computed(() => {
  return {
    search: $api.CompanyAdminQuery,
    remove: $api.CompanyAdminDelete,
    showMobileOperate: true,
    hasEdit: false,
    hasRemove: false,
    hasSearch: false,
    hasAdd: false,
    showResetPwd:true,
    width: 190,
    key: (e) => {
      return {
        userKey: userKey.value,
        key: e.userKey
      };
    },
    keyword: (e) => {
      e.userKey = userKey.value;
      e.key = "";
      e.code = "";
      e.num = 0;
      e.state = 0;
      e.date = new Date();
      e.keyword = e.keyword || "";
      e.rangeStart = "";
      e.rangeEnd = "";
      return e;
    },
  };
});
</script>

<style></style>